<?php
/**
 * Created by PhpStorm.
 * User: august
 * Date: 2021/5/19
 * Time: 11:22
 */

namespace DesignPatterns\Structure\Decorator;


class Egg extends Decorator
{
    public function name()
    {
        return $this->food->name() . '+蛋';
    }

    public function price()
    {
        return $this->food->price() + 1;
    }
}